Data Type Guide

IntegrationHub uses a comprehensive type system to handle data flowing through your integration recipes. Each data type provides built-in validation, JSON serialization, and smart handling of references to ensure your integrations work reliably and predictably.

Simple Value Types

These types handle basic data values that you'll use in most integrations:

String (S)

Purpose: Text data like names, descriptions, URLs, or any textual content

Examples: User names, email addresses, API endpoints

Features: Supports references to dynamic values and external content

  {
    "type": "S",
    "name": "User Name"
  }

Boolean (B)

Purpose: True/false values for flags, conditions, and yes/no decisions

Examples: User active status, feature flags, approval states

Usage: Perfect for conditional logic in your recipes

  {
    "type": "B",
    "name": "User Active Status"
  }

Numbers

IntegrationHub provides several numeric types for different precision and range requirements:

  • Integer (I): Whole numbers like counts, IDs, or quantities
  • Long (L): Large whole numbers for timestamps, large IDs
  • Double (D): Decimal numbers with high precision
  • Float (F): Decimal numbers with standard precision

Examples: User ages, prices, percentages, record counts

  {
    "type": "I",
    "name": "User Age"
  }
  {
    "type": "D", 
    "name": "Product Price"
  }

Complex Data Types

Object (O)

Purpose: Structured data with named fields, like a record or entity

Examples: User profiles, product information, API responses

Features:

  • Define specific fields with their own types
  • Nested objects supported
  • Built-in getter methods for easy field access

Use Case: When you need to work with structured data from databases or APIs

  {
  "type": "O",
  "name": "User Profile",
  "fields": [{
      "type": "S",
      "name": "last name"
    },
    {
      "type": "S",
      "name": "email"
    },
    {
      "type": "B",
      "name": "isActive"
    }
  ]
}

Array (A)

Purpose: Lists of items of the same type

Examples: List of users, collection of products, array of messages

Features:

  • Type-safe collections
  • Built-in operations for filtering, mapping, and transforming

Use Case: When working with multiple records or bulk operations

  {
    "type": "A",
    "name": "List of Users",
    "itemType": {
      "type": "O",
      "fields": [
        {
          "type": "S",
          "name": "first name"
        },
        {
          "type": "S",
          "name": "email"
        }
      ]
    }
  }

Choice (CHOICE)

Purpose: A value that can be one of several different types

Examples: A field that might be either a string or a number depending on context

Features: Runtime type checking and validation

Use Case: Handling APIs that return different data types in the same field

  {
    "type": "CHOICE",
    "name": "Dynamic Field",
    "types": [
      {
        "name": "stringValue",
        "type": "S"
      },
      {
        "name": "numberValue",
        "type": "I"
      }
    ]
  }

Additional Customization

Categories

Purpose: Categories allow fields to be grouped together in the UI

Examples: Three distinct sections of a single config, advanced options which are hidden by default

Use Case: When you want fields organised in a specific order, grouped together, or minimised

  {
  "type": "O",
  "name": "User Profile",
  "categories": [
    {
        "name": "category one (name)",
        "defaultCollapsed": false,
        "fields": [
            "first name",
            "last name"
        ]
    },
    {
        "name": "category two (contact details)",
        "defaultCollapsed": true,
        "fields": [
            "email",
            "phone number"
        ]
    }
  ],
  "fields": [
    {
        "type": "S",
        "name": "first name"
    },  
    {
      "type": "S",
      "name": "last name"
    },
    {
      "type": "S",
      "name": "email"
    },
    {
        "type": "I",
        "name": "phone number"
    }
  ]
}

Validators

Purpose: Validators allow fields to define their own input rules

Examples: Recipe validation, password rules

Use Case: When an input field has stricter requirements than just what type of data represents it

    {
    "type": "O",
    "name": "User Profile",
    "fields": [
        {
            "type": "S",
            "name": "first name",
            "validators": [
                {
                    "rule": "stringLength",
                    "max": "12"
                },
                {
                    "rule": "empty",
                    "hint": "Value cannot be empty"
                }
            ]
        },  
        {
        "type": "S",
        "name": "last name"
        },
        {
            "type": "S",
            "name": "Password",
            "validators": [
                {
                    "rule": "stringLength",
                    "min": "12"
                }
            ]
        },
        {
        "type": "S",
        "name": "email"
        },
        {
            "type": "I",
            "name": "phone number"
        },
        {
        "type": "B",
        "name": "isActive"
        }
    ]
    }
    

Default values

Purpose: Default values pre populate fields with a pre defined value

Examples: Suggested values in recipes

Use Case: When a field should have a pre defined suggested answer or show the format the field expects

  {
  "type": "O",
  "name": "User Profile",
  "fields": [
    {
        "type": "S",
        "name": "first name",
        "default": "John"
    },  
    {
      "type": "S",
      "name": "last name",
      "default": "Smith"
    },
    {
        "type": "I",
        "name": "age",
        "default": 47
    },
    {
      "type": "F",
      "name": "GPA",
      "default": 3.79
    },
    {
      "type": "Jv",
      "name": "profile blurb",
      "default": {
        "a bit about you": "Tell people about yourself",
        "hobbies": "Fill in hobbies here",
        "how many cats do you have?": 0
      }
    },
    {
      "type": "B",
      "name": "isActive",
      "default": true
    },
    {
      "type": "Js",
      "name": "User transform func",
      "prefix": "function(user) {",
      "suffix": "}",
      "default": "return user;"
    }
  ]
}

Specialized Types

JSON Value (Jv)

Purpose: Raw JSON data that you want to preserve as-is

Examples: Configuration objects, dynamic API responses

Use Case: When you need maximum flexibility with JSON data

  {
    "type": "Jv",
    "name": "Raw Configuration"
  }

JavaScript String (Js)

Purpose: An editor that functions as an input field for user defined Javascript

Examples: Custom transformation functions, validation logic

Features: Has customizable string fields suffix and prefix which are displayed in the editor and allow developers to show users what arguments are available. These fields are visual only and will not impact the way Flow processes any user code.

Use Case: When you need to give users an editor to write their own code

  {
    "type": "Js",
    "name": "Transform Function",
    "prefix": "function(paramOne, paramTwo) {",
    "suffix": "}"
  }

Byte Array (BYTS)

Purpose: Binary data like files, images, or encoded content

Examples: File uploads, image data, encrypted content

Features: Automatic Base64 encoding/decoding

Use Case: File handling and binary data processing

  {
    "type": "BYTS",
    "name": "File Data",
    "encoding": "base64"
  }

Exception (E)

Purpose: Error information and exception handling

Examples: API errors, validation failures, system exceptions

Features: Structured error information with stack traces

Use Case: Error handling and debugging in your recipes

  {
    "type": "E",
    "name": "Error Information"
  }

Description (Dsc)

Purpose: Documentation and help text for recipe steps

Examples: Step descriptions, user instructions, help text

Use Case: Making your recipes self-documenting

  {
    "type": "Dsc",
    "name": "Step Description",
    "plaintextDescription": "This step processes user data and validates email addresses"
  }
  {
    "type": "Dsc",
    "name": "Step Description",
    "htmlDescription": "<div><h2>heading</h2><p>paragraph</p></div>"
  }

This type system provides the foundation for building robust, maintainable integrations that handle data reliably and predictably across all your connected systems.